package com.sg.controller.bff;

import com.sg.service.biz.bff.TargetTempService;
import com.sg.dto.biz.bff.req.*;
import com.sg.dto.biz.bff.res.*;
import com.sg.common.ro.OkrResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：
 * @version 1.0
 * @date ：
 */
@Api(value = "TargetTemp", tags = {"TargetTemp"})
@RestController
// @RequestMapping("/oms/targetTemp/")
public class TargetTempController {
    @Autowired
    TargetTempService targetTempService;

    /**
     * B3-1查标签关系下我创建的指标模板列表(管理)
     * gen by moon at 12/9/2022, 2:27:52 PM
     */
    @PostMapping("/oms/mgt/targetTemp/queryTagRelIcreateTargetTempList")
    @ApiOperation(value = "B3-1查标签关系下我创建的指标模板列表(管理)", response = OkrResult.class)
    public OkrResult<BffQueryTagRelIcreateTargetTempListRespDto> queryTagRelIcreateTargetTempList(@RequestBody(required = false) @Validated BffQueryTagRelIcreateTargetTempListReqDto reqDTO) {
        return OkrResult.success(targetTempService.queryTagRelIcreateTargetTempList(reqDTO));
    }

    /**
     * B3-1查标签关系下指标模板列表(边界)
     * gen by moon at 11/3/2022, 11:13:44 PM
     */
    @PostMapping("/oms/targetTemp/queryTagRelTargetTempListBorder")
    @ApiOperation(value = "B3-1查标签关系下指标模板列表(边界)", response = OkrResult.class)
    public OkrResult<BffQueryTagRelTargetTempListBorderRespDto> queryTagRelTargetTempListBorder(@RequestBody(required = false) @Validated BffQueryTagRelTargetTempListBorderReqDto reqDTO) {
        return OkrResult.success(targetTempService.queryTagRelTargetTempListBorder(reqDTO));
    }

    /**
     * B3-1查指标模板详情(边界)
     * gen by moon at 12/9/2022, 2:27:51 PM
     */
    @PostMapping("/oms/targetTemp/queryTargetTempDetailBorder")
    @ApiOperation(value = "B3-1查指标模板详情(边界)", response = OkrResult.class)
    public OkrResult<BffQueryTargetTempDetailBorderRespDto> queryTargetTempDetailBorder(@RequestBody(required = false) @Validated BffQueryTargetTempDetailBorderReqDto reqDTO) {
        return OkrResult.success(targetTempService.queryTargetTempDetailBorder(reqDTO));
    }

    /**
     * B3-1查我创建的指标模板列表(管理)
     * gen by moon at 10/18/2022, 10:04:33 PM
     */
    @PostMapping("/oms/mgt/targetTemp/queryMyCreateTargetTempList")
    @ApiOperation(value = "B3-1查我创建的指标模板列表(管理)", response = OkrResult.class)
    public OkrResult<BffQueryMyCreateTargetTempListRespDto> queryMyCreateTargetTempList(@RequestBody(required = false) @Validated BffQueryMyCreateTargetTempListReqDto reqDTO) {
        return OkrResult.success(targetTempService.queryMyCreateTargetTempList(reqDTO));
    }

    /**
     * B3-1查指标模板详情(管理)
     * gen by moon at 12/9/2022, 2:27:47 PM
     */
    @PostMapping("/oms/mgt/targetTemp/queryTargetTempDetail")
    @ApiOperation(value = "B3-1查指标模板详情(管理)", response = OkrResult.class)
    public OkrResult<BffQueryTargetTempDetailRespDto> queryTargetTempDetail(@RequestBody(required = false) @Validated BffQueryTargetTempDetailReqDto reqDTO) {
        return OkrResult.success(targetTempService.queryTargetTempDetail(reqDTO));
    }

    /**
     * B3-1新增指标模板(管理)
     * gen by moon at 12/9/2022, 2:27:48 PM
     */
    @PostMapping("/oms/mgt/targetTemp/addTargetTemp")
    @ApiOperation(value = "B3-1新增指标模板(管理)", response = OkrResult.class)
    public OkrResult<BffAddTargetTempRespDto> addTargetTemp(@RequestBody(required = false) @Validated BffAddTargetTempReqDto reqDTO) {
        return OkrResult.success(targetTempService.addTargetTemp(reqDTO));
    }

    /**
     * B3-1修改指标模板(管理)
     * gen by moon at 12/9/2022, 2:27:49 PM
     */
    @PostMapping("/oms/mgt/targetTemp/updateTargetTemp")
    @ApiOperation(value = "B3-1修改指标模板(管理)", response = OkrResult.class)
    public OkrResult<BffUpdateTargetTempRespDto> updateTargetTemp(@RequestBody(required = false) @Validated BffUpdateTargetTempReqDto reqDTO) {
        return OkrResult.success(targetTempService.updateTargetTemp(reqDTO));
    }

    /**
     * B3-1新增牵头部门的指标模板(管理)
     * gen by moon at 12/13/2022, 4:10:34 AM
     */
    @PostMapping("/oms/mgt/targetTemp/addLeadDeptTargetTemp")
    @ApiOperation(value = "B3-1新增牵头部门的指标模板(管理)", response = OkrResult.class)
    public OkrResult<BffAddLeadDeptTargetTempRespDto> addLeadDeptTargetTemp(@RequestBody(required = false) @Validated BffAddLeadDeptTargetTempReqDto reqDTO) {
        return OkrResult.success(targetTempService.addLeadDeptTargetTemp(reqDTO));
    }

    /**
     * B3-1删除我创建的指标模板(管理)
     * gen by moon at 12/2/2022, 5:08:54 PM
     */
    @PostMapping("/oms/mgt/targetTemp/deleteIcreateTargetTemp")
    @ApiOperation(value = "B3-1删除我创建的指标模板(管理)", response = OkrResult.class)
    public OkrResult<BffDeleteIcreateTargetTempRespDto> deleteIcreateTargetTemp(@RequestBody(required = false) @Validated BffDeleteIcreateTargetTempReqDto reqDTO) {
        return OkrResult.success(targetTempService.deleteIcreateTargetTemp(reqDTO));
    }

    /**
     * B3-1查询指标模板列表(管理)
     * gen by moon at 12/6/2022, 4:59:40 PM
     */
    @PostMapping("/oms/mgt/targetTemp/queryManageTargetTempList")
    @ApiOperation(value = "B3-1查询指标模板列表(管理)", response = OkrResult.class)
    public OkrResult<BffQueryManageTargetTempListRespDto> queryManageTargetTempList(@RequestBody(required = false) @Validated BffQueryManageTargetTempListReqDto reqDTO) {
        return OkrResult.success(targetTempService.queryManageTargetTempList(reqDTO));
    }

    /**
     * B3-1修改牵头部门的指标模板(管理)
     * gen by moon at 12/9/2022, 2:27:55 PM
     */
    @PostMapping("/oms/mgt/targetTemp/updateLeadDeptTargetTemp")
    @ApiOperation(value = "B3-1修改牵头部门的指标模板(管理)", response = OkrResult.class)
    public OkrResult<BffUpdateLeadDeptTargetTempRespDto> updateLeadDeptTargetTemp(@RequestBody(required = false) @Validated BffUpdateLeadDeptTargetTempReqDto reqDTO) {
        return OkrResult.success(targetTempService.updateLeadDeptTargetTemp(reqDTO));
    }

    /**
     * B3-1检查删除我创建的指标模板条件(管理)
     * gen by moon at 10/8/2022, 3:09:07 AM
     */
    @PostMapping("/oms/mgt/targetTemp/checkIcreateTargetTemp")
    @ApiOperation(value = "B3-1检查删除我创建的指标模板条件(管理)", response = OkrResult.class)
    public OkrResult<BffCheckIcreateTargetTempRespDto> checkIcreateTargetTemp(@RequestBody(required = false) @Validated BffCheckIcreateTargetTempReqDto reqDTO) {
        return OkrResult.success(targetTempService.checkIcreateTargetTemp(reqDTO));
    }

    /**
     * B3-2删除指标模板(管理)
     * gen by moon at 10/18/2022, 6:12:52 AM
     */
    @PostMapping("/oms/mgt/targetTemp/deleteTargetTemp")
    @ApiOperation(value = "B3-2删除指标模板(管理)", response = OkrResult.class)
    public OkrResult<BffDeleteTargetTempRespDto> deleteTargetTemp(@RequestBody(required = false) @Validated BffDeleteTargetTempReqDto reqDTO) {
        return OkrResult.success(targetTempService.deleteTargetTemp(reqDTO));
    }

    /**
     * B3-2存档指标模板(管理)
     * gen by moon at 10/19/2022, 7:22:54 PM
     */
    @PostMapping("/oms/mgt/targetTemp/archiveTargetTemp")
    @ApiOperation(value = "B3-2存档指标模板(管理)", response = OkrResult.class)
    public OkrResult<BffArchiveTargetTempRespDto> archiveTargetTemp(@RequestBody(required = false) @Validated BffArchiveTargetTempReqDto reqDTO) {
        return OkrResult.success(targetTempService.archiveTargetTemp(reqDTO));
    }

    /**
     * B3-2撤销存档指标模板(管理)
     * gen by moon at 10/19/2022, 7:22:55 PM
     */
    @PostMapping("/oms/mgt/targetTemp/undoArchiveTargetTemp")
    @ApiOperation(value = "B3-2撤销存档指标模板(管理)", response = OkrResult.class)
    public OkrResult<BffUndoArchiveTargetTempRespDto> undoArchiveTargetTemp(@RequestBody(required = false) @Validated BffUndoArchiveTargetTempReqDto reqDTO) {
        return OkrResult.success(targetTempService.undoArchiveTargetTemp(reqDTO));
    }

    /**
     * B3-1查询编辑的指标模板详情(管理)
     * gen by moon at 11/23/2022, 10:43:06 PM
     */
    @PostMapping("/oms/mgt/targetTemp/queryEditTargetTempDetail")
    @ApiOperation(value = "B3-1查询编辑的指标模板详情(管理)", response = OkrResult.class)
    public OkrResult<BffQueryEditTargetTempDetailRespDto> queryEditTargetTempDetail(@RequestBody(required = false) @Validated BffQueryEditTargetTempDetailReqDto reqDTO) {
        return OkrResult.success(targetTempService.queryEditTargetTempDetail(reqDTO));
    }

}

